/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package ac.GUI.treasury;

import ac.engin.moves.sell;
import ac.settings.dataModel;
import ac.settings.files;
import ac.settings.sqlQuerys;
import ac.ui.controls.PCLFrame;
import ac.ui.controls.PCLPanel;
import ac.ui.custemItmes;
import ac.uitls.propertiesOperation;
import java.awt.Component;
import java.awt.Dimension;
import java.text.ParseException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JPanel;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;

/**
 *
 * @author ismail
 */
public class Installment extends PCLPanel implements files, dataModel, sqlQuerys {

    ac.engin.treasury.Installment i = new ac.engin.treasury.Installment();

    /**
     * Creates new form Installment
     */
    ac.uitls.data d = new ac.uitls.data();

    public Installment(String Status, String BillId) {
        initComponents();
        onLoad();
        updateTemplae();
        i.EnablePanels(false);

        updateStatus(Status, BillId);

        ac.ui.utils.comBoxFills(jcom_search, ac.uitls.data.addValueToArray(i.dataSaveFields, 0, ""), ac.uitls.data.addValueToArray(d.updateArrayLang(i.dataSaveFields), 0, ""));

        jm_installpay.setText(po.getWord("label.installmentPay"));
        jm_installpaySearch.setText(po.getWord("label.installmentPay"));

        jlb_statuss.setBorder(javax.swing.BorderFactory.createTitledBorder(po.getWord("label.status")));
        jlb_payid.setBorder(javax.swing.BorderFactory.createTitledBorder(po.getWord("label.treasuryin") + " " + po.getWord("label.number")));
        jp_retportTaype.setBorder(javax.swing.BorderFactory.createTitledBorder(po.getWord("label.reptype")));
        jp_retportNames.setBorder(javax.swing.BorderFactory.createTitledBorder(po.getWord("label.repnames")));
        jp_retportcon.setBorder(javax.swing.BorderFactory.createTitledBorder(po.getWord("label.repoptions")));
        jtab_data.setTitleAt(1, po.getWord("label.thisSearch"));
        jtab_data.setTitleAt(0, po.getWord("label.home"));
        jtab_data.setTitleAt(2, po.getWord("label.threportes"));
        deleteAttars();
    }

    void deleteAttars() {

        jtab_data.setTitleAt(3, po.getWord("label.deletefiles"));
        jtab_data.addChangeListener(new ChangeListener() {
            public void stateChanged(ChangeEvent e) {

                if (jtab_data.getSelectedIndex() == 3) {
                    updateTemplae();
                    i.indexdelete();

                    updateTemplae_items();
                    i.indexdelete();

                }
            }
        });

    }

    propertiesOperation po = new propertiesOperation();

    void updateStatus(String Status, String BillId) {
        if (Status.equalsIgnoreCase("sell")) {
            ac.ui.utils u = new ac.ui.utils();

            i.addStep1();

            sell s = new sell();
            String[] sData = s.getMove(BillId);

            //            i.dataComponents = new Component[]{jtxt_code, jsp_amount, jtxt_moveId, jtxt_moveType, jcom_client, jcom_client};
            String[] d = new String[]{"noValue", s.getPricBill(BillId), sData[0], "sell", sData[1], sData[1]};

            u.DataToComponents(i.dataComponents, -1, d, i.dataSaveFields, i.TabelString, null);

        }
    }

    void updateTemplae() {
        i.panels = new JPanel[]{data_panel};
        i.dataSaveFields = new String[]{"code", "amount", "move_id", "move_type", "c_title", "c_id"};
        i.dataViewAS = new String[]{"id_hide", "_midwidth", "_midwidth", "_midwidth", "_maxWidth", "_hide", "_hide"};

        i.dataComponents = new Component[]{jtxt_code, jsp_amount, jtxt_moveId, jtxt_moveType, jcom_client, jcom_client};
        i.dataSaveAs = new String[]{"", "", "", "", "text"};
        i.TabelString = TABLE_installment;
        jtxt_code.setTable(i.TabelString);
        i.ActionsButtons.put("add", jbt_add);
//        i.ActionsButtons.put("edit", jbt_edit);
        i.ActionsButtons.put("delete", jbt_delete);
        i.deleteTabel = jtab_indexDelete;
    }

    void updateTemplae_items() {
        i.dataSaveFields = new String[]{"Installment_id", "number", "date", "amount"};
        i.dataViewAS = new String[]{"id_hide", "_hide", "_minwidth", "date_midwidth", "mony_"};
        i.TabelString = TABLE_installment_items;
        i.deleteTabel = jtab_indexDeleteItesm;
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        pCLpopupMenuFroserach = new ac.ui.controls.PCLpopupMenu();
        jm_installpaySearch = new javax.swing.JMenuItem();
        pCLpopupMenu1 = new ac.ui.controls.PCLpopupMenu();
        jm_installpay = new javax.swing.JMenuItem();
        jtab_data = new ac.ui.controls.PCLTabs();
        pCLPanel3 = new ac.ui.controls.PCLPanel();
        jScrollPane11 = new javax.swing.JScrollPane();
        jtb_index = new ac.ui.controls.PCLTable();
        data_panel = new ac.ui.controls.PCLPanel();
        jScrollPane12 = new javax.swing.JScrollPane();
        jta_more = new ac.ui.controls.PCLTextarea();
        jtxt_code = new ac.ui.controls.PCLCode();
        pCLLabel17 = new ac.ui.controls.PCLLabel();
        jsp_amount = new ac.ui.controls.PCLMoney();
        pCLLabel25 = new ac.ui.controls.PCLLabel();
        pCLLabel19 = new ac.ui.controls.PCLLabel();
        pCLLabel24 = new ac.ui.controls.PCLLabel();
        pCLLabel26 = new ac.ui.controls.PCLLabel();
        pCLLabel18 = new ac.ui.controls.PCLLabel();
        jcom_client = new ac.ui.controls.PCLGetdata();
        jsp_every = new ac.ui.controls.PCLMoney();
        pCLLabel27 = new ac.ui.controls.PCLLabel();
        jsp_installNumber = new ac.ui.controls.PCLMoney();
        pCLLabel28 = new ac.ui.controls.PCLLabel();
        jtxt_moveType = new ac.ui.controls.PCLTextField();
        jtxt_moveId = new ac.ui.controls.PCLTextField();
        pCLToolbar2 = new ac.ui.controls.PCLToolbar();
        jbt_add = new ac.ui.controls.PCLButton();
        jbt_delete = new ac.ui.controls.PCLButton();
        jbt_print4 = new ac.ui.controls.PCLButton();
        jbt_cancel = new ac.ui.controls.PCLButton();
        jlb_status = new org.jdesktop.swingx.JXLabel();
        pCLPanel1 = new ac.ui.controls.PCLPanel();
        jPanel1 = new javax.swing.JPanel();
        jcom_search = new ac.ui.controls.PCLcomboBox();
        pCLLabel2 = new ac.ui.controls.PCLLabel();
        pCLLabel1 = new ac.ui.controls.PCLLabel();
        pCLButton1 = new ac.ui.controls.PCLButton();
        jtxt_search = new ac.ui.controls.PCLTextField();
        jd_dateto = new ac.ui.controls.PCLDate();
        pCLLabel20 = new ac.ui.controls.PCLLabel();
        jd_from = new ac.ui.controls.PCLDate();
        pCLLabel23 = new ac.ui.controls.PCLLabel();
        pCLButton2 = new ac.ui.controls.PCLButton();
        jPanel2 = new javax.swing.JPanel();
        pCLToolbar8 = new ac.ui.controls.PCLToolbar();
        jbt_edit1 = new ac.ui.controls.PCLButton();
        jbt_delete1 = new ac.ui.controls.PCLButton();
        jbt_print1 = new ac.ui.controls.PCLButton();
        jScrollPane5 = new javax.swing.JScrollPane();
        jtb_search = new ac.ui.controls.PCLTable();
        jScrollPane6 = new javax.swing.JScrollPane();
        jtb_search1 = new ac.ui.controls.PCLTable();
        pCLToolbar9 = new ac.ui.controls.PCLToolbar();
        jbt_edit2 = new ac.ui.controls.PCLButton();
        jbt_delete2 = new ac.ui.controls.PCLButton();
        jbt_print5 = new ac.ui.controls.PCLButton();
        jlb_statuss = new ac.ui.controls.PCLLabel();
        jlb_payid = new ac.ui.controls.PCLLabel();
        jPanel5 = new javax.swing.JPanel();
        jp_retportNames = new ac.ui.controls.PCLPanel();
        jScrollPane7 = new javax.swing.JScrollPane();
        jtab_rep_names = new ac.ui.controls.PCLTable();
        jScrollPane9 = new javax.swing.JScrollPane();
        jtr_rep_category = new ac.ui.controls.PCLTree();
        jp_retportTaype = new ac.ui.controls.PCLPanel();
        jScrollPane8 = new javax.swing.JScrollPane();
        jtr_rep_type = new ac.ui.controls.PCLTree();
        jScrollPane10 = new javax.swing.JScrollPane();
        pCLTextarea1 = new ac.ui.controls.PCLTextarea();
        jp_retportcon = new ac.ui.controls.PCLPanel();
        jd_rep_view = new ac.ui.controls.PCLButton();
        jd_rep_to = new ac.ui.controls.PCLDate();
        pCLLabel22 = new ac.ui.controls.PCLLabel();
        jd_rep_from = new ac.ui.controls.PCLDate();
        pCLLabel21 = new ac.ui.controls.PCLLabel();
        jlb_repTitle = new ac.ui.controls.PCLLabel();
        pCLPanel4 = new ac.ui.controls.PCLPanel();
        pCLPanel2 = new ac.ui.controls.PCLPanel();
        jScrollPane13 = new javax.swing.JScrollPane();
        jtab_indexDeleteItesm = new ac.ui.controls.PCLTable();
        pCLToolbar10 = new ac.ui.controls.PCLToolbar();
        jbt_removeItems = new ac.ui.controls.PCLButton();
        jbt_removeAllItems = new ac.ui.controls.PCLButton();
        jbt_restoreItems = new ac.ui.controls.PCLButton();
        jbt_restoreAllItems = new ac.ui.controls.PCLButton();
        pCLPanel5 = new ac.ui.controls.PCLPanel();
        jScrollPane14 = new javax.swing.JScrollPane();
        jtab_indexDelete = new ac.ui.controls.PCLTable();
        pCLToolbar11 = new ac.ui.controls.PCLToolbar();
        jbt_remove = new ac.ui.controls.PCLButton();
        jbt_removeAll = new ac.ui.controls.PCLButton();
        jbt_restore = new ac.ui.controls.PCLButton();
        jbt_restoreAll = new ac.ui.controls.PCLButton();

        jm_installpaySearch.setText("jMenuItem1");
        jm_installpaySearch.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jm_installpaySearchActionPerformed(evt);
            }
        });
        pCLpopupMenuFroserach.add(jm_installpaySearch);

        jm_installpay.setText("jMenuItem1");
        jm_installpay.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jm_installpayActionPerformed(evt);
            }
        });
        pCLpopupMenu1.add(jm_installpay);

        jtab_data.setTabPlacement(javax.swing.JTabbedPane.RIGHT);

        jtb_index.setComponentPopupMenu(pCLpopupMenu1);
        jtb_index.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jtb_indexMouseClicked(evt);
            }
        });
        jScrollPane11.setViewportView(jtb_index);

        jta_more.setColumns(20);
        jta_more.setRows(5);
        jScrollPane12.setViewportView(jta_more);

        jtxt_code.setAuto(true);
        jtxt_code.setTable("");
        jtxt_code.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jtxt_codeActionPerformed(evt);
            }
        });

        pCLLabel17.setText("jlb_code");

        pCLLabel25.setText("jlb_amount");

        pCLLabel19.setText("jlb_moveID");

        pCLLabel24.setText("jlb_moveType");

        pCLLabel26.setText("jlb_more");

        pCLLabel18.setText("jlb_client");

        jcom_client.setAddtype("clients");
        jcom_client.setRequired(true);
        jcom_client.setToolTipText("");
        jcom_client.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jcom_clientActionPerformed(evt);
            }
        });

        jsp_every.setModel(new javax.swing.SpinnerNumberModel());

        pCLLabel27.setText("jlb_every");

        jsp_installNumber.setModel(new javax.swing.SpinnerNumberModel());

        pCLLabel28.setText("jlb_installNumber");

        javax.swing.GroupLayout data_panelLayout = new javax.swing.GroupLayout(data_panel);
        data_panel.setLayout(data_panelLayout);
        data_panelLayout.setHorizontalGroup(
            data_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(data_panelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(data_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(data_panelLayout.createSequentialGroup()
                        .addGroup(data_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jtxt_code, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(pCLLabel17, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(data_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(pCLLabel18, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jcom_client, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(data_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(pCLLabel25, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jsp_amount, javax.swing.GroupLayout.PREFERRED_SIZE, 226, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(data_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(pCLLabel27, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jsp_every, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(data_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(pCLLabel28, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jsp_installNumber, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(data_panelLayout.createSequentialGroup()
                        .addGroup(data_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(pCLLabel19, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jtxt_moveId, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(13, 13, 13)
                        .addGroup(data_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(data_panelLayout.createSequentialGroup()
                                .addComponent(pCLLabel24, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(51, 51, 51)
                                .addComponent(pCLLabel26, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(jtxt_moveType, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jScrollPane12)))
                .addContainerGap())
        );
        data_panelLayout.setVerticalGroup(
            data_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(data_panelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(data_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(data_panelLayout.createSequentialGroup()
                        .addGroup(data_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(pCLLabel18, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(pCLLabel17, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(data_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jtxt_code, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jcom_client, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(data_panelLayout.createSequentialGroup()
                        .addComponent(pCLLabel25, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jsp_amount, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(data_panelLayout.createSequentialGroup()
                        .addGroup(data_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(pCLLabel27, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(pCLLabel28, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(data_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jsp_every, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jsp_installNumber, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(data_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane12, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                    .addGroup(data_panelLayout.createSequentialGroup()
                        .addGroup(data_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(pCLLabel19, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(pCLLabel26, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(pCLLabel24, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(data_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jtxt_moveType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jtxt_moveId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap())
        );

        pCLToolbar2.setRollover(true);

        jbt_add.setType("add");
        jbt_add.setFocusable(false);
        jbt_add.setText("jbt_add");
        jbt_add.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbt_addActionPerformed(evt);
            }
        });
        pCLToolbar2.add(jbt_add);

        jbt_delete.setType("delete");
        jbt_delete.setFocusable(false);
        jbt_delete.setText("jbt_delete");
        jbt_delete.setVerticalTextPosition(3);
        jbt_delete.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbt_deleteActionPerformed(evt);
            }
        });
        pCLToolbar2.add(jbt_delete);

        jbt_print4.setType("print");
        jbt_print4.setFocusable(false);
        jbt_print4.setText("jbt_print");
        jbt_print4.setVerticalTextPosition(3);
        jbt_print4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbt_print4ActionPerformed(evt);
            }
        });
        pCLToolbar2.add(jbt_print4);

        jbt_cancel.setType("cancel");
        jbt_cancel.setFocusable(false);
        jbt_cancel.setText("jbt_cancel");
        jbt_cancel.setVerticalTextPosition(3);
        jbt_cancel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbt_cancelActionPerformed(evt);
            }
        });
        pCLToolbar2.add(jbt_cancel);

        jlb_status.setBorder(javax.swing.BorderFactory.createCompoundBorder());
        jlb_status.setIconTextGap(0);
        jlb_status.setMaximumSize(new java.awt.Dimension(50, 14));
        jlb_status.setPreferredSize(new java.awt.Dimension(50, 14));
        pCLToolbar2.add(jlb_status);

        javax.swing.GroupLayout pCLPanel3Layout = new javax.swing.GroupLayout(pCLPanel3);
        pCLPanel3.setLayout(pCLPanel3Layout);
        pCLPanel3Layout.setHorizontalGroup(
            pCLPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane11, javax.swing.GroupLayout.Alignment.TRAILING)
            .addComponent(data_panel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(pCLToolbar2, javax.swing.GroupLayout.DEFAULT_SIZE, 914, Short.MAX_VALUE)
        );
        pCLPanel3Layout.setVerticalGroup(
            pCLPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pCLPanel3Layout.createSequentialGroup()
                .addComponent(data_panel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(pCLToolbar2, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane11, javax.swing.GroupLayout.DEFAULT_SIZE, 616, Short.MAX_VALUE))
        );

        jtab_data.addTab("tab4", pCLPanel3);

        jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(java.awt.Color.gray));

        pCLLabel2.setText("jlb_searchWord");

        pCLLabel1.setText("jlb_searchIn");

        pCLButton1.setText("jbt_search");
        pCLButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                pCLButton1ActionPerformed(evt);
            }
        });

        jd_dateto.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jd_datetoMouseClicked(evt);
            }
        });
        jd_dateto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jd_datetoActionPerformed(evt);
            }
        });
        jd_dateto.addHierarchyListener(new java.awt.event.HierarchyListener() {
            public void hierarchyChanged(java.awt.event.HierarchyEvent evt) {
                jd_datetoHierarchyChanged(evt);
            }
        });

        pCLLabel20.setText("jlb_top");

        jd_from.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jd_fromMouseClicked(evt);
            }
        });
        jd_from.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jd_fromActionPerformed(evt);
            }
        });
        jd_from.addHierarchyListener(new java.awt.event.HierarchyListener() {
            public void hierarchyChanged(java.awt.event.HierarchyEvent evt) {
                jd_fromHierarchyChanged(evt);
            }
        });

        pCLLabel23.setText("jlb_from");

        pCLButton2.setText("jbt_search");
        pCLButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                pCLButton2ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(pCLLabel20, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(pCLLabel23, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(pCLButton1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 174, Short.MAX_VALUE)
                            .addComponent(jd_dateto, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jd_from, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jtxt_search, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(pCLLabel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(pCLLabel2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jcom_search, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(pCLButton2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addGap(0, 13, Short.MAX_VALUE))))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(24, 24, 24)
                .addComponent(pCLLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jcom_search, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(12, 12, 12)
                .addComponent(pCLLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jtxt_search, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(pCLButton2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(117, 117, 117)
                .addComponent(pCLLabel23, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jd_from, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(pCLLabel20, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jd_dateto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(pCLButton1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(333, Short.MAX_VALUE))
        );

        pCLToolbar8.setRollover(true);

        jbt_edit1.setType("edit");
        jbt_edit1.setFocusable(false);
        jbt_edit1.setText("jbt_edit");
        jbt_edit1.setVerticalTextPosition(3);
        jbt_edit1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbt_edit1ActionPerformed(evt);
            }
        });
        pCLToolbar8.add(jbt_edit1);

        jbt_delete1.setType("delete");
        jbt_delete1.setFocusable(false);
        jbt_delete1.setText("jbt_delete");
        jbt_delete1.setVerticalTextPosition(3);
        jbt_delete1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbt_delete1ActionPerformed(evt);
            }
        });
        pCLToolbar8.add(jbt_delete1);

        jbt_print1.setType("print");
        jbt_print1.setFocusable(false);
        jbt_print1.setText("jbt_print");
        jbt_print1.setVerticalTextPosition(3);
        jbt_print1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbt_print1ActionPerformed(evt);
            }
        });
        pCLToolbar8.add(jbt_print1);

        jtb_search.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jtb_searchMouseClicked(evt);
            }
        });
        jScrollPane5.setViewportView(jtb_search);

        jtb_search1.setComponentPopupMenu(pCLpopupMenuFroserach);
        jtb_search1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jtb_search1MouseClicked(evt);
            }
        });
        jScrollPane6.setViewportView(jtb_search1);

        pCLToolbar9.setRollover(true);

        jbt_edit2.setType("edit");
        jbt_edit2.setFocusable(false);
        jbt_edit2.setText("jbt_edit");
        jbt_edit2.setVerticalTextPosition(3);
        jbt_edit2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbt_edit2ActionPerformed(evt);
            }
        });
        pCLToolbar9.add(jbt_edit2);

        jbt_delete2.setType("delete");
        jbt_delete2.setFocusable(false);
        jbt_delete2.setText("jbt_delete");
        jbt_delete2.setVerticalTextPosition(3);
        jbt_delete2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbt_delete2ActionPerformed(evt);
            }
        });
        pCLToolbar9.add(jbt_delete2);

        jbt_print5.setType("print");
        jbt_print5.setFocusable(false);
        jbt_print5.setText("jbt_print");
        jbt_print5.setVerticalTextPosition(3);
        jbt_print5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbt_print5ActionPerformed(evt);
            }
        });
        pCLToolbar9.add(jbt_print5);

        jlb_statuss.setBorder(javax.swing.BorderFactory.createTitledBorder("ddddddddd"));
        jlb_statuss.setMaximumSize(new java.awt.Dimension(150, 40));
        jlb_statuss.setPreferredSize(new java.awt.Dimension(150, 40));
        pCLToolbar9.add(jlb_statuss);

        jlb_payid.setBorder(javax.swing.BorderFactory.createTitledBorder("ddddddddd"));
        jlb_payid.setMaximumSize(new java.awt.Dimension(150, 40));
        jlb_payid.setMinimumSize(new java.awt.Dimension(150, 40));
        jlb_payid.setPreferredSize(new java.awt.Dimension(150, 40));
        jlb_payid.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jlb_payidMouseClicked(evt);
            }
        });
        pCLToolbar9.add(jlb_payid);

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(pCLToolbar8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
            .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                .addComponent(pCLToolbar9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addComponent(pCLToolbar8, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane5, javax.swing.GroupLayout.DEFAULT_SIZE, 331, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(pCLToolbar9, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane6, javax.swing.GroupLayout.DEFAULT_SIZE, 342, Short.MAX_VALUE)
                .addContainerGap())
        );

        javax.swing.GroupLayout pCLPanel1Layout = new javax.swing.GroupLayout(pCLPanel1);
        pCLPanel1.setLayout(pCLPanel1Layout);
        pCLPanel1Layout.setHorizontalGroup(
            pCLPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pCLPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(705, Short.MAX_VALUE))
            .addGroup(pCLPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pCLPanel1Layout.createSequentialGroup()
                    .addGap(216, 216, 216)
                    .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
        );
        pCLPanel1Layout.setVerticalGroup(
            pCLPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pCLPanel1Layout.createSequentialGroup()
                .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGap(1, 1, 1))
            .addGroup(pCLPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jtab_data.addTab("jtab_index", pCLPanel1);

        jp_retportNames.setBorder(javax.swing.BorderFactory.createTitledBorder("aaaaa"));

        jtab_rep_names.setType("index");
        jtab_rep_names.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jtab_rep_namesMouseClicked(evt);
            }
        });
        jtab_rep_names.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jtab_rep_namesKeyPressed(evt);
            }
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jtab_rep_namesKeyReleased(evt);
            }
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jtab_rep_namesKeyTyped(evt);
            }
        });
        jScrollPane7.setViewportView(jtab_rep_names);

        javax.swing.tree.DefaultMutableTreeNode treeNode1 = new javax.swing.tree.DefaultMutableTreeNode("root");
        jtr_rep_category.setModel(new javax.swing.tree.DefaultTreeModel(treeNode1));
        jtr_rep_category.setAddtype("productsCat");
        jtr_rep_category.addTreeSelectionListener(new javax.swing.event.TreeSelectionListener() {
            public void valueChanged(javax.swing.event.TreeSelectionEvent evt) {
                jtr_rep_categoryValueChanged(evt);
            }
        });
        jScrollPane9.setViewportView(jtr_rep_category);

        javax.swing.GroupLayout jp_retportNamesLayout = new javax.swing.GroupLayout(jp_retportNames);
        jp_retportNames.setLayout(jp_retportNamesLayout);
        jp_retportNamesLayout.setHorizontalGroup(
            jp_retportNamesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane7, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
            .addComponent(jScrollPane9, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 282, Short.MAX_VALUE)
        );
        jp_retportNamesLayout.setVerticalGroup(
            jp_retportNamesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jp_retportNamesLayout.createSequentialGroup()
                .addGap(11, 11, 11)
                .addComponent(jScrollPane9, javax.swing.GroupLayout.PREFERRED_SIZE, 189, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane7, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))
        );

        jp_retportTaype.setBorder(javax.swing.BorderFactory.createTitledBorder("aaaaa"));
        jp_retportTaype.setPreferredSize(new java.awt.Dimension(200, 282));

        treeNode1 = new javax.swing.tree.DefaultMutableTreeNode("root");
        jtr_rep_type.setModel(new javax.swing.tree.DefaultTreeModel(treeNode1));
        jtr_rep_type.setAddtype("proRepType");
        jtr_rep_type.addTreeSelectionListener(new javax.swing.event.TreeSelectionListener() {
            public void valueChanged(javax.swing.event.TreeSelectionEvent evt) {
                jtr_rep_typeValueChanged(evt);
            }
        });
        jScrollPane8.setViewportView(jtr_rep_type);

        pCLTextarea1.setBackground(new java.awt.Color(255, 255, 204));
        pCLTextarea1.setColumns(20);
        pCLTextarea1.setRows(5);
        jScrollPane10.setViewportView(pCLTextarea1);

        javax.swing.GroupLayout jp_retportTaypeLayout = new javax.swing.GroupLayout(jp_retportTaype);
        jp_retportTaype.setLayout(jp_retportTaypeLayout);
        jp_retportTaypeLayout.setHorizontalGroup(
            jp_retportTaypeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane8)
            .addComponent(jScrollPane10, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 280, Short.MAX_VALUE)
        );
        jp_retportTaypeLayout.setVerticalGroup(
            jp_retportTaypeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jp_retportTaypeLayout.createSequentialGroup()
                .addComponent(jScrollPane8, javax.swing.GroupLayout.PREFERRED_SIZE, 283, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane10, javax.swing.GroupLayout.DEFAULT_SIZE, 412, Short.MAX_VALUE))
        );

        jp_retportcon.setBorder(javax.swing.BorderFactory.createTitledBorder("aaaaa"));

        jd_rep_view.setText("jbt_search");
        jd_rep_view.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jd_rep_viewActionPerformed(evt);
            }
        });

        pCLLabel22.setText("jlb_To");

        pCLLabel21.setText("jlb_From");

        javax.swing.GroupLayout jp_retportconLayout = new javax.swing.GroupLayout(jp_retportcon);
        jp_retportcon.setLayout(jp_retportconLayout);
        jp_retportconLayout.setHorizontalGroup(
            jp_retportconLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jd_rep_view, javax.swing.GroupLayout.DEFAULT_SIZE, 294, Short.MAX_VALUE)
            .addComponent(jd_rep_to, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(jd_rep_from, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(jp_retportconLayout.createSequentialGroup()
                .addComponent(pCLLabel21, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 0, Short.MAX_VALUE))
            .addGroup(jp_retportconLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pCLLabel22, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jp_retportconLayout.setVerticalGroup(
            jp_retportconLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jp_retportconLayout.createSequentialGroup()
                .addGap(17, 17, 17)
                .addComponent(pCLLabel21, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jd_rep_from, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(pCLLabel22, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jd_rep_to, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jd_rep_view, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jlb_repTitle.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jlb_repTitle.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jlb_repTitle.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jlb_repTitle.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addComponent(jp_retportTaype, javax.swing.GroupLayout.DEFAULT_SIZE, 292, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jp_retportNames, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jp_retportcon, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addComponent(jlb_repTitle, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jlb_repTitle, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jp_retportTaype, javax.swing.GroupLayout.DEFAULT_SIZE, 724, Short.MAX_VALUE)
                    .addComponent(jp_retportNames, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jp_retportcon, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
        );

        jtab_data.addTab("tab3", jPanel5);

        jtab_indexDeleteItesm.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {

            }
        ));
        jtab_indexDeleteItesm.setType("index");
        jtab_indexDeleteItesm.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jtab_indexDeleteItesmMouseClicked(evt);
            }
        });
        jtab_indexDeleteItesm.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                jtab_indexDeleteItesmPropertyChange(evt);
            }
        });
        jtab_indexDeleteItesm.addInputMethodListener(new java.awt.event.InputMethodListener() {
            public void caretPositionChanged(java.awt.event.InputMethodEvent evt) {
                jtab_indexDeleteItesmCaretPositionChanged(evt);
            }
            public void inputMethodTextChanged(java.awt.event.InputMethodEvent evt) {
            }
        });
        jtab_indexDeleteItesm.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jtab_indexDeleteItesmKeyPressed(evt);
            }
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jtab_indexDeleteItesmKeyTyped(evt);
            }
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jtab_indexDeleteItesmKeyReleased(evt);
            }
        });
        jtab_indexDeleteItesm.addVetoableChangeListener(new java.beans.VetoableChangeListener() {
            public void vetoableChange(java.beans.PropertyChangeEvent evt)throws java.beans.PropertyVetoException {
                jtab_indexDeleteItesmVetoableChange(evt);
            }
        });
        jScrollPane13.setViewportView(jtab_indexDeleteItesm);

        pCLToolbar10.setRollover(true);

        jbt_removeItems.setType("remove");
        jbt_removeItems.setFocusable(false);
        jbt_removeItems.setText("jbt_remove");
        jbt_removeItems.setVerticalTextPosition(3);
        jbt_removeItems.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbt_removeItemsActionPerformed(evt);
            }
        });
        pCLToolbar10.add(jbt_removeItems);

        jbt_removeAllItems.setType("removeAll");
        jbt_removeAllItems.setFocusable(false);
        jbt_removeAllItems.setText("jbt_removeAll");
        jbt_removeAllItems.setVerticalTextPosition(3);
        jbt_removeAllItems.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbt_removeAllItemsActionPerformed(evt);
            }
        });
        pCLToolbar10.add(jbt_removeAllItems);

        jbt_restoreItems.setType("restore");
        jbt_restoreItems.setFocusable(false);
        jbt_restoreItems.setText("jbt_restore");
        jbt_restoreItems.setVerticalTextPosition(3);
        jbt_restoreItems.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbt_restoreItemsActionPerformed(evt);
            }
        });
        pCLToolbar10.add(jbt_restoreItems);

        jbt_restoreAllItems.setType("restoreAll");
        jbt_restoreAllItems.setFocusable(false);
        jbt_restoreAllItems.setText("jbt_restoreAll");
        jbt_restoreAllItems.setVerticalTextPosition(3);
        jbt_restoreAllItems.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbt_restoreAllItemsActionPerformed(evt);
            }
        });
        pCLToolbar10.add(jbt_restoreAllItems);

        javax.swing.GroupLayout pCLPanel2Layout = new javax.swing.GroupLayout(pCLPanel2);
        pCLPanel2.setLayout(pCLPanel2Layout);
        pCLPanel2Layout.setHorizontalGroup(
            pCLPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pCLPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane13, javax.swing.GroupLayout.DEFAULT_SIZE, 874, Short.MAX_VALUE)
                .addContainerGap())
            .addComponent(pCLToolbar10, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        pCLPanel2Layout.setVerticalGroup(
            pCLPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pCLPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pCLToolbar10, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane13, javax.swing.GroupLayout.DEFAULT_SIZE, 313, Short.MAX_VALUE)
                .addContainerGap())
        );

        jtab_indexDelete.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {

            }
        ));
        jtab_indexDelete.setType("index");
        jtab_indexDelete.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jtab_indexDeleteMouseClicked(evt);
            }
        });
        jtab_indexDelete.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                jtab_indexDeletePropertyChange(evt);
            }
        });
        jtab_indexDelete.addInputMethodListener(new java.awt.event.InputMethodListener() {
            public void caretPositionChanged(java.awt.event.InputMethodEvent evt) {
                jtab_indexDeleteCaretPositionChanged(evt);
            }
            public void inputMethodTextChanged(java.awt.event.InputMethodEvent evt) {
            }
        });
        jtab_indexDelete.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jtab_indexDeleteKeyPressed(evt);
            }
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jtab_indexDeleteKeyTyped(evt);
            }
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jtab_indexDeleteKeyReleased(evt);
            }
        });
        jtab_indexDelete.addVetoableChangeListener(new java.beans.VetoableChangeListener() {
            public void vetoableChange(java.beans.PropertyChangeEvent evt)throws java.beans.PropertyVetoException {
                jtab_indexDeleteVetoableChange(evt);
            }
        });
        jScrollPane14.setViewportView(jtab_indexDelete);

        pCLToolbar11.setRollover(true);

        jbt_remove.setType("remove");
        jbt_remove.setFocusable(false);
        jbt_remove.setText("jbt_remove");
        jbt_remove.setVerticalTextPosition(3);
        jbt_remove.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbt_removeActionPerformed(evt);
            }
        });
        pCLToolbar11.add(jbt_remove);

        jbt_removeAll.setType("removeAll");
        jbt_removeAll.setFocusable(false);
        jbt_removeAll.setText("jbt_removeAll");
        jbt_removeAll.setVerticalTextPosition(3);
        jbt_removeAll.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbt_removeAllActionPerformed(evt);
            }
        });
        pCLToolbar11.add(jbt_removeAll);

        jbt_restore.setType("restore");
        jbt_restore.setFocusable(false);
        jbt_restore.setText("jbt_restore");
        jbt_restore.setVerticalTextPosition(3);
        jbt_restore.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbt_restoreActionPerformed(evt);
            }
        });
        pCLToolbar11.add(jbt_restore);

        jbt_restoreAll.setType("restoreAll");
        jbt_restoreAll.setFocusable(false);
        jbt_restoreAll.setText("jbt_restoreAll");
        jbt_restoreAll.setVerticalTextPosition(3);
        jbt_restoreAll.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbt_restoreAllActionPerformed(evt);
            }
        });
        pCLToolbar11.add(jbt_restoreAll);

        javax.swing.GroupLayout pCLPanel5Layout = new javax.swing.GroupLayout(pCLPanel5);
        pCLPanel5.setLayout(pCLPanel5Layout);
        pCLPanel5Layout.setHorizontalGroup(
            pCLPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pCLPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane14, javax.swing.GroupLayout.DEFAULT_SIZE, 874, Short.MAX_VALUE)
                .addContainerGap())
            .addComponent(pCLToolbar11, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        pCLPanel5Layout.setVerticalGroup(
            pCLPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pCLPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pCLToolbar11, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane14, javax.swing.GroupLayout.DEFAULT_SIZE, 293, Short.MAX_VALUE)
                .addContainerGap())
        );

        javax.swing.GroupLayout pCLPanel4Layout = new javax.swing.GroupLayout(pCLPanel4);
        pCLPanel4.setLayout(pCLPanel4Layout);
        pCLPanel4Layout.setHorizontalGroup(
            pCLPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pCLPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pCLPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(pCLPanel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(pCLPanel5, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        pCLPanel4Layout.setVerticalGroup(
            pCLPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pCLPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pCLPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGap(18, 18, 18)
                .addComponent(pCLPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        jtab_data.addTab("tab4", pCLPanel4);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jtab_data, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jtab_data, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
    }// </editor-fold>//GEN-END:initComponents

    private void jtb_indexMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jtb_indexMouseClicked

        String p = jtb_index.getValue();
        if (p != null) {
            Installment_items f = new Installment_items(p, i.thisId);
            f.setVisible(true);

            String status = i.getStatus(p);
            if (status.equalsIgnoreCase("1")) {

                jlb_status.setText(po.getWord("label.paydone"));
            } else {

                jlb_status.setText(po.getWord("label.paynotdone"));

            }
        }

    }//GEN-LAST:event_jtb_indexMouseClicked

    private void jtxt_codeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtxt_codeActionPerformed

    }//GEN-LAST:event_jtxt_codeActionPerformed
    public void updateindex() {
        updateTemplae_items();
        String where = "";
        where = "`Installment_id`='" + i.thisId + "' and ";

        i.Where = where + " 1=1 ";

        i.serachTabel = jtb_index;
        i.indexsearch();

    }

    public static void updateindex(String Bid) {
        ac.engin.treasury.Installment i = new ac.engin.treasury.Installment();
        String where = "";
        i.TabelString = TABLE_installment_items;
        i.dataSaveFields = new String[]{"Installment_id", "number", "date", "amount"};
        where = "`Installment_id`='" + Bid + "' and ";

        i.Where = where + " 1=1 ";

        i.serachTabel = jtb_index;
        i.indexsearch();

    }


    private void jbt_addActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbt_addActionPerformed
        try {

            updateTemplae();

            i.dataSaveValues = ac.ui.utils.getDataFromComss(i.dataComponents, i.dataSaveAs);

            if (i.setnewRetuenSataus(true, false, false, true, false) > 0) {
                i.thisId = i.getLast();
                updateTemplae_items();
                double amount = Double.parseDouble(jsp_amount.getValue().toString());
                String n = jsp_installNumber.getValue().toString();
                double number = Double.parseDouble(n);
                double every = Double.parseDouble(jsp_every.getValue().toString());
                i.crateInstallMent(number, amount, every);
                updateindex();
            }
        } catch (ParseException ex) {
            Logger.getLogger(Installment.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_jbt_addActionPerformed

    private void jbt_deleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbt_deleteActionPerformed
        updateTemplae_items();

        i.IndexID = Integer.parseInt(jtb_index.getValue());

        i.setdelete(true, false, false);
        updateindex();

    }//GEN-LAST:event_jbt_deleteActionPerformed

    private void jbt_cancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbt_cancelActionPerformed

    }//GEN-LAST:event_jbt_cancelActionPerformed

    private void pCLButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_pCLButton1ActionPerformed
        updateTemplae_items();

        String where = "";
        if (jd_dateto.getDate() != null) {
            where = ac.lib.data.dateTime.updateSerechDates("date", jd_from.getDate(), jd_dateto.getDate()) + " and ";
        }

        i.Where = where + " 1=1 ";

        i.serachTabel = jtb_search1;
        i.indexsearch();
    }//GEN-LAST:event_pCLButton1ActionPerformed

    private void jd_datetoMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jd_datetoMouseClicked

    }//GEN-LAST:event_jd_datetoMouseClicked

    private void jd_datetoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jd_datetoActionPerformed


    }//GEN-LAST:event_jd_datetoActionPerformed

    private void jd_datetoHierarchyChanged(java.awt.event.HierarchyEvent evt) {//GEN-FIRST:event_jd_datetoHierarchyChanged

    }//GEN-LAST:event_jd_datetoHierarchyChanged

    private void jbt_edit1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbt_edit1ActionPerformed
        EditSerach();
    }//GEN-LAST:event_jbt_edit1ActionPerformed

    private void jbt_delete1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbt_delete1ActionPerformed

        updateTemplae();
        i.IndexID = Integer.parseInt(jtb_search.getValue());

        if (i.setdeleteStatus(true, false, false) > 0) {
            updateTemplae_items();
            String where = "`Installment_id`='" + i.IndexID + "'";

            i.setdelete(where, true, false, false);
        };


    }//GEN-LAST:event_jbt_delete1ActionPerformed

    private void jbt_print1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbt_print1ActionPerformed
        updateTemplae();
        String where = " where installment.id=" + i.thisId;
        i.setPrint(REPORT_Installment_file_print, sqlQuerys.SQL_installment + where);
    }//GEN-LAST:event_jbt_print1ActionPerformed

    private void jtb_searchMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jtb_searchMouseClicked

        i.thisId = jtb_search.getValue();

        updateTemplae_items();

        i.Where = "`Installment_id`= '" + i.thisId + "'";

        i.serachTabel = jtb_search1;
        i.indexsearch();


    }//GEN-LAST:event_jtb_searchMouseClicked

    private void jtab_rep_namesMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jtab_rep_namesMouseClicked

    }//GEN-LAST:event_jtab_rep_namesMouseClicked

    private void jtab_rep_namesKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jtab_rep_namesKeyPressed

    }//GEN-LAST:event_jtab_rep_namesKeyPressed

    private void jtab_rep_namesKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jtab_rep_namesKeyReleased

    }//GEN-LAST:event_jtab_rep_namesKeyReleased

    private void jtab_rep_namesKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jtab_rep_namesKeyTyped

    }//GEN-LAST:event_jtab_rep_namesKeyTyped

    private void jtr_rep_categoryValueChanged(javax.swing.event.TreeSelectionEvent evt) {//GEN-FIRST:event_jtr_rep_categoryValueChanged

    }//GEN-LAST:event_jtr_rep_categoryValueChanged

    private void jtr_rep_typeValueChanged(javax.swing.event.TreeSelectionEvent evt) {//GEN-FIRST:event_jtr_rep_typeValueChanged

    }//GEN-LAST:event_jtr_rep_typeValueChanged

    private void jd_rep_viewActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jd_rep_viewActionPerformed

    }//GEN-LAST:event_jd_rep_viewActionPerformed

    private void jcom_clientActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcom_clientActionPerformed


    }//GEN-LAST:event_jcom_clientActionPerformed

    private void jbt_print4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbt_print4ActionPerformed
        updateTemplae();

        String where = " where installment.id=" + i.thisId;
        i.setPrint(REPORT_Installment_file_print, sqlQuerys.SQL_installment + where);
    }//GEN-LAST:event_jbt_print4ActionPerformed

    private void jd_fromMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jd_fromMouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_jd_fromMouseClicked

    private void jd_fromActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jd_fromActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jd_fromActionPerformed

    private void jd_fromHierarchyChanged(java.awt.event.HierarchyEvent evt) {//GEN-FIRST:event_jd_fromHierarchyChanged
        // TODO add your handling code here:
    }//GEN-LAST:event_jd_fromHierarchyChanged

    private void pCLButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_pCLButton2ActionPerformed

        String where = "";
        updateTemplae();
        String seword = jtxt_search.getText();

        if (!seword.equals("")) {

            where += "`" + ac.ui.utils.comBoxGetValue(jcom_search) + "`like '%" + jtxt_search.getText() + "%' and ";
        }

        i.Where = where + " 1=1 ";
        i.dataViewAS = null;
        i.serachTabel = jtb_search;
        i.indexsearch();


    }//GEN-LAST:event_pCLButton2ActionPerformed
    void EditSerach() {
        updateTemplae();
        i.IndexID = Integer.parseInt(jtb_search.getValue());
        i.FrameDataupdate(i.IndexID);
        //   i.eidtStep1();

        jtab_data.setSelectedIndex(0);
        i.thisId = "" + i.IndexID;
        updateindex();

    }
    private void jtb_search1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jtb_search1MouseClicked

        String id = jtb_search1.getValue();

        String status = i.getStatus(id);

        if (status.equalsIgnoreCase("1")) {

            jlb_statuss.setText(po.getWord("label.paydone"));
            jlb_payid.setText(i.getPyId(id));
        } else {

            jlb_statuss.setText(po.getWord("label.paynotdone"));

        }

        updateTemplae();
        i.dataViewAS = null;
        i.Where = "`id`= '" + i.getidFromItems(id) + "'";

        i.serachTabel = jtb_search;
        i.indexsearch();


    }//GEN-LAST:event_jtb_search1MouseClicked

    private void jbt_delete2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbt_delete2ActionPerformed

        updateTemplae_items();
        i.IndexID = Integer.parseInt(jtb_search1.getValue());

        i.setdelete(true, false, false);
    }//GEN-LAST:event_jbt_delete2ActionPerformed

    private void jbt_edit2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbt_edit2ActionPerformed
        EditSerach();    }//GEN-LAST:event_jbt_edit2ActionPerformed

    private void jm_installpaySearchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jm_installpaySearchActionPerformed

        i.installPay(jtb_search1.getValue());


    }//GEN-LAST:event_jm_installpaySearchActionPerformed

    private void jlb_payidMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jlb_payidMouseClicked
        String s = jlb_payid.getText();
        if (!s.equals("0") && !s.equals("0")) {
            i.gotoPay(jlb_payid.getText());

        }

    }//GEN-LAST:event_jlb_payidMouseClicked

    private void jm_installpayActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jm_installpayActionPerformed
        i.installPay(jtb_index.getValue());
    }//GEN-LAST:event_jm_installpayActionPerformed

    private void jtab_indexDeleteItesmMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jtab_indexDeleteItesmMouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_jtab_indexDeleteItesmMouseClicked

    private void jtab_indexDeleteItesmPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_jtab_indexDeleteItesmPropertyChange
        // TODO add your handling code here:
    }//GEN-LAST:event_jtab_indexDeleteItesmPropertyChange

    private void jtab_indexDeleteItesmCaretPositionChanged(java.awt.event.InputMethodEvent evt) {//GEN-FIRST:event_jtab_indexDeleteItesmCaretPositionChanged

    }//GEN-LAST:event_jtab_indexDeleteItesmCaretPositionChanged

    private void jtab_indexDeleteItesmKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jtab_indexDeleteItesmKeyPressed
        // TODO add your handling code here:
    }//GEN-LAST:event_jtab_indexDeleteItesmKeyPressed

    private void jtab_indexDeleteItesmKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jtab_indexDeleteItesmKeyReleased
        // TODO add your handling code here:
    }//GEN-LAST:event_jtab_indexDeleteItesmKeyReleased

    private void jtab_indexDeleteItesmKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jtab_indexDeleteItesmKeyTyped
        // TODO add your handling code here:
    }//GEN-LAST:event_jtab_indexDeleteItesmKeyTyped

    private void jtab_indexDeleteItesmVetoableChange(java.beans.PropertyChangeEvent evt)throws java.beans.PropertyVetoException {//GEN-FIRST:event_jtab_indexDeleteItesmVetoableChange

    }//GEN-LAST:event_jtab_indexDeleteItesmVetoableChange

    private void jbt_removeItemsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbt_removeItemsActionPerformed
        updateTemplae_items();
        i.setRemove(Integer.parseInt(d.IndexGetValue(i.deleteTabel)));
        i.indexdelete();
    }//GEN-LAST:event_jbt_removeItemsActionPerformed

    private void jbt_removeAllItemsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbt_removeAllItemsActionPerformed
        updateTemplae_items();
        i.setRemoveAll();
        i.indexdelete();
    }//GEN-LAST:event_jbt_removeAllItemsActionPerformed

    private void jbt_restoreItemsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbt_restoreItemsActionPerformed
        updateTemplae_items();
        i.setRestore(Integer.parseInt(d.IndexGetValue(i.deleteTabel)));
        i.indexdelete();
    }//GEN-LAST:event_jbt_restoreItemsActionPerformed

    private void jbt_restoreAllItemsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbt_restoreAllItemsActionPerformed
        updateTemplae_items();
        i.setRestoreAll();
        i.indexdelete();
    }//GEN-LAST:event_jbt_restoreAllItemsActionPerformed

    private void jtab_indexDeleteMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jtab_indexDeleteMouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_jtab_indexDeleteMouseClicked

    private void jtab_indexDeletePropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_jtab_indexDeletePropertyChange
        // TODO add your handling code here:
    }//GEN-LAST:event_jtab_indexDeletePropertyChange

    private void jtab_indexDeleteCaretPositionChanged(java.awt.event.InputMethodEvent evt) {//GEN-FIRST:event_jtab_indexDeleteCaretPositionChanged
        // TODO add your handling code here:
    }//GEN-LAST:event_jtab_indexDeleteCaretPositionChanged

    private void jtab_indexDeleteKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jtab_indexDeleteKeyPressed
        // TODO add your handling code here:
    }//GEN-LAST:event_jtab_indexDeleteKeyPressed

    private void jtab_indexDeleteKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jtab_indexDeleteKeyReleased
        // TODO add your handling code here:
    }//GEN-LAST:event_jtab_indexDeleteKeyReleased

    private void jtab_indexDeleteKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jtab_indexDeleteKeyTyped
        // TODO add your handling code here:
    }//GEN-LAST:event_jtab_indexDeleteKeyTyped

    private void jtab_indexDeleteVetoableChange(java.beans.PropertyChangeEvent evt)throws java.beans.PropertyVetoException {//GEN-FIRST:event_jtab_indexDeleteVetoableChange
        // TODO add your handling code here:
    }//GEN-LAST:event_jtab_indexDeleteVetoableChange

    private void jbt_removeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbt_removeActionPerformed
        updateTemplae();
        i.setRemove(Integer.parseInt(d.IndexGetValue(i.deleteTabel)));
        i.indexdelete();
    }//GEN-LAST:event_jbt_removeActionPerformed

    private void jbt_removeAllActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbt_removeAllActionPerformed
        updateTemplae();
        i.setRemoveAll();
        i.indexdelete();
    }//GEN-LAST:event_jbt_removeAllActionPerformed

    private void jbt_restoreActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbt_restoreActionPerformed
        updateTemplae();
        i.setRestore(Integer.parseInt(d.IndexGetValue(i.deleteTabel)));
        i.indexdelete();
    }//GEN-LAST:event_jbt_restoreActionPerformed

    private void jbt_restoreAllActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbt_restoreAllActionPerformed
        updateTemplae();
        i.setRestoreAll();
        i.indexdelete();
    }//GEN-LAST:event_jbt_restoreAllActionPerformed

    private void jbt_print5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbt_print5ActionPerformed

        updateTemplae();
        String where = " where installment.id=" + i.thisId;
        i.setPrint(REPORT_Installment_file_print, sqlQuerys.SQL_installment + where);        // TODO add your handling code here:
    }//GEN-LAST:event_jbt_print5ActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private ac.ui.controls.PCLPanel data_panel;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JScrollPane jScrollPane10;
    private javax.swing.JScrollPane jScrollPane11;
    private javax.swing.JScrollPane jScrollPane12;
    private javax.swing.JScrollPane jScrollPane13;
    private javax.swing.JScrollPane jScrollPane14;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JScrollPane jScrollPane6;
    private javax.swing.JScrollPane jScrollPane7;
    private javax.swing.JScrollPane jScrollPane8;
    private javax.swing.JScrollPane jScrollPane9;
    private ac.ui.controls.PCLButton jbt_add;
    private ac.ui.controls.PCLButton jbt_cancel;
    private ac.ui.controls.PCLButton jbt_delete;
    private ac.ui.controls.PCLButton jbt_delete1;
    private ac.ui.controls.PCLButton jbt_delete2;
    private ac.ui.controls.PCLButton jbt_edit1;
    private ac.ui.controls.PCLButton jbt_edit2;
    private ac.ui.controls.PCLButton jbt_print1;
    private ac.ui.controls.PCLButton jbt_print4;
    private ac.ui.controls.PCLButton jbt_print5;
    private ac.ui.controls.PCLButton jbt_remove;
    private ac.ui.controls.PCLButton jbt_removeAll;
    private ac.ui.controls.PCLButton jbt_removeAllItems;
    private ac.ui.controls.PCLButton jbt_removeItems;
    private ac.ui.controls.PCLButton jbt_restore;
    private ac.ui.controls.PCLButton jbt_restoreAll;
    private ac.ui.controls.PCLButton jbt_restoreAllItems;
    private ac.ui.controls.PCLButton jbt_restoreItems;
    private ac.ui.controls.PCLGetdata jcom_client;
    private ac.ui.controls.PCLcomboBox jcom_search;
    private ac.ui.controls.PCLDate jd_dateto;
    private ac.ui.controls.PCLDate jd_from;
    private ac.ui.controls.PCLDate jd_rep_from;
    private ac.ui.controls.PCLDate jd_rep_to;
    private ac.ui.controls.PCLButton jd_rep_view;
    private ac.ui.controls.PCLLabel jlb_payid;
    private ac.ui.controls.PCLLabel jlb_repTitle;
    private org.jdesktop.swingx.JXLabel jlb_status;
    private ac.ui.controls.PCLLabel jlb_statuss;
    private javax.swing.JMenuItem jm_installpay;
    private javax.swing.JMenuItem jm_installpaySearch;
    private ac.ui.controls.PCLPanel jp_retportNames;
    private ac.ui.controls.PCLPanel jp_retportTaype;
    private ac.ui.controls.PCLPanel jp_retportcon;
    private ac.ui.controls.PCLMoney jsp_amount;
    private ac.ui.controls.PCLMoney jsp_every;
    private ac.ui.controls.PCLMoney jsp_installNumber;
    private ac.ui.controls.PCLTextarea jta_more;
    private ac.ui.controls.PCLTabs jtab_data;
    private ac.ui.controls.PCLTable jtab_indexDelete;
    private ac.ui.controls.PCLTable jtab_indexDeleteItesm;
    private ac.ui.controls.PCLTable jtab_rep_names;
    private static ac.ui.controls.PCLTable jtb_index;
    private ac.ui.controls.PCLTable jtb_search;
    private ac.ui.controls.PCLTable jtb_search1;
    private ac.ui.controls.PCLTree jtr_rep_category;
    private ac.ui.controls.PCLTree jtr_rep_type;
    private ac.ui.controls.PCLCode jtxt_code;
    private ac.ui.controls.PCLTextField jtxt_moveId;
    private ac.ui.controls.PCLTextField jtxt_moveType;
    private ac.ui.controls.PCLTextField jtxt_search;
    private ac.ui.controls.PCLButton pCLButton1;
    private ac.ui.controls.PCLButton pCLButton2;
    private ac.ui.controls.PCLLabel pCLLabel1;
    private ac.ui.controls.PCLLabel pCLLabel17;
    private ac.ui.controls.PCLLabel pCLLabel18;
    private ac.ui.controls.PCLLabel pCLLabel19;
    private ac.ui.controls.PCLLabel pCLLabel2;
    private ac.ui.controls.PCLLabel pCLLabel20;
    private ac.ui.controls.PCLLabel pCLLabel21;
    private ac.ui.controls.PCLLabel pCLLabel22;
    private ac.ui.controls.PCLLabel pCLLabel23;
    private ac.ui.controls.PCLLabel pCLLabel24;
    private ac.ui.controls.PCLLabel pCLLabel25;
    private ac.ui.controls.PCLLabel pCLLabel26;
    private ac.ui.controls.PCLLabel pCLLabel27;
    private ac.ui.controls.PCLLabel pCLLabel28;
    private ac.ui.controls.PCLPanel pCLPanel1;
    private ac.ui.controls.PCLPanel pCLPanel2;
    private ac.ui.controls.PCLPanel pCLPanel3;
    private ac.ui.controls.PCLPanel pCLPanel4;
    private ac.ui.controls.PCLPanel pCLPanel5;
    private ac.ui.controls.PCLTextarea pCLTextarea1;
    private ac.ui.controls.PCLToolbar pCLToolbar10;
    private ac.ui.controls.PCLToolbar pCLToolbar11;
    private ac.ui.controls.PCLToolbar pCLToolbar2;
    private ac.ui.controls.PCLToolbar pCLToolbar8;
    private ac.ui.controls.PCLToolbar pCLToolbar9;
    private ac.ui.controls.PCLpopupMenu pCLpopupMenu1;
    private ac.ui.controls.PCLpopupMenu pCLpopupMenuFroserach;
    // End of variables declaration//GEN-END:variables
}
